import request from '@/utils/request.js'

/**
 * 获取分类列表
 * @param {*} page 
 * @returns 
 */
export const getCatetype = (page = 1) => {
  return request.get(`/catetype/${page}`)
}

/**
 * 新增、编辑分类
 */
export const saveCatetype = (data, id = "") => {
  let url = id ? `/catetype/${id}/update` : `/catetype/save`
  return request.post(url, data)
}